home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / human interface toolbox / packagetool / packagewindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.3 KB  |  74 lines

  1. /*
  2.     file PackageWindow.h
  3.     
  4.     Description:
  5.     This file contains routine declarations used for accessing the main
  6.     window displayed by the PackageTool application.
  7.     
  8.     PackageTool is an application illustrating how to create application
  9.     packages in Mac OS 9.  It provides a simple interface for converting
  10.     correctly formatted folders into packages and vice versa.
  11.  
  12.     Copyright: © 1999 by Apple Computer, Inc.
  13.     all rights reserved.
  14.     
  15.     Disclaimer:
  16.     You may incorporate this sample code into your applications without
  17.     restriction, though the sample code has been provided "AS IS" and the
  18.     responsibility for its operation is 100% yours.  However, what you are
  19.     not permitted to do is to redistribute the source as "DSC Sample Code"
  20.     after having made changes. If you're going to re-distribute the source,
  21.     we require that you make it clear in the source that the code was
  22.     descended from Apple Sample Code, but that you've made changes.
  23.     
  24.     Change History (most recent first):
  25.     10/19/99 created
  26. */
  27.  
  28.  
  29. #ifndef __PACKAGEWINDOW__
  30. #define __PACKAGEWINDOW__
  31.  
  32. #define TARGET_API_MAC_CARBON 1
  33.  
  34. #include <Types.h>
  35. #include <Files.h>
  36. #include <Windows.h>
  37.  
  38. /* CreatePackageWindow creates the package window.  If it cannot be
  39.     created, then an error is returned. */
  40. OSStatus CreatePackageWindow(void);
  41.  
  42.  
  43. /* ClosePackageWindow closes the package window and disposes of
  44.     any structures allocated when it was opened. */
  45. void ClosePackageWindow(void);
  46.  
  47.  
  48. /* SetNewDisplay is to set the display to a new package or folder.  If
  49.     targetFile is NULL, then the display is cleared. */
  50. void SetNewDisplay(FSSpec *targetFile);
  51.  
  52.  
  53. /* IsPackageWindow returns true if the window pointed to by
  54.     target is the package window. */
  55. Boolean IsPackageWindow(WindowPtr target);
  56.  
  57.  
  58. /* ActivatePackageWindow handles an activate event for the
  59.     package window. */
  60. void ActivatePackageWindow(WindowPtr target, Boolean activate);
  61.  
  62.  
  63. /* HitPackageWindow should be called when DialogSelect indicates
  64.     that an item in the package window has been hit. */
  65. void HitPackageWindow(DialogPtr theDialog, EventRecord *event, short itemNo);
  66.  
  67.  
  68. /* SelectFolderOrPackage provides user interaction through calling
  69.     navigation services that allows the user to choose a package or
  70.     a folder for display in the main window.   */
  71. OSStatus SelectFolderOrPackage(void);
  72.  
  73. #endif
  74.